package com.atguigu.juc.study.chapter03.cf.api;

import java.util.concurrent.ExecutionException;
import java.util.concurrent.FutureTask;

/**
 * @author : leimingchao
 * @date Date : 2022年06月07日 22:26
 */
public class CompletableFutureDemo {

    public static void main(String[] args) throws ExecutionException, InterruptedException {

        FutureTask futureTask = new FutureTask(new MyThread());

        Thread thread = new Thread(futureTask);

        thread.start();
        System.out.println(futureTask.get());
    }
}
